const {
  get,
  post,
  pureGet,
  upload,
  Put
} = require("./../utils/http");
const {
  contactUrlParams
} = require("./../utils/util");
//运单列表
const flowList = param => {
  const query = contactUrlParams(param)
  return post(`/flow/list${query}`);
}
//id查询运单
const flowGetById = param => {
  const query = contactUrlParams(param)
  return post(`/flow/getById${query}`);
}
//提醒经销商
const flowRemind = param => {
  // const query = contactUrlParams(param)
  // return post(`/flow/remind${query}`);
  return post(`/flow/remind`, param);
}
//新增审核意见
const flowAuditCreate = param => {
  return post(`/audit/create`, param);
}

//报警单列表
const abnormalList = param => {
  const query = contactUrlParams(param)
  return post(`/abnormal/list${query}`);
}
const abnormalGetById = param => {
  const query = contactUrlParams(param)
  return post(`/abnormal/getById${query}`);
}
const abnormalApiGetById = param => {
  const query = contactUrlParams(param)
  return post(`/abnormal/api/getById${query}`);
}
// 异常处理
const dealAbnormal = param => {
  return post(`/abnormal/dealAbnormal`, param);
}
const dealAbnormalApi = param => {
  return post(`/abnormal/api/dealAbnormal`, param);
}
const getgpsforeign = params => {
  const query = contactUrlParams(params)
  return post(`/center/vehicle/getgpsforeign${query}`)
}
const getlatespointforeign = params => {
  const query = contactUrlParams(params)
  return post(`/center/vehicle/getlatespointforeign${query}`)
}
module.exports = {
  flowList,
  flowGetById,
  flowRemind,
  flowAuditCreate,
  abnormalList,
  abnormalGetById,
  abnormalApiGetById,
  dealAbnormal,
  dealAbnormalApi,
  getgpsforeign,
  getlatespointforeign
}